﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

//using Domain.MainModule.Countries;
using Infraestructure.CrossCutting.IoC;
using Domain.MainModule.Entities;

namespace Domain.MainModule.Tests.Services
{

    [TestClass()]
    [DeploymentItem("Infraestructure.Data.MainModule.Mock.dll")]
    [DeploymentItem("Infraestructure.Data.MainModule.dll")]
    public class CountryServiceTests
    {


        #region Public Test Methods


        //[TestMethod()]
        //public void AddCountry_Invoke_Test()
        //{
        //    //Arrange
        //    ICountryService countryService = ServiceFactory.Current.Resolve<ICountryService>();
        //    string countryName = "Belgium";
        //    Country country = new Country()
        //    {
        //        CountryName = countryName
        //    };

        //    //Act
        //    countryService.AddCountry(country);

        //    //Assert
        //    List<Country> selectedCountries = countryService.FindCountriesByName(countryName);

        //    Assert.IsNotNull(selectedCountries);
        //    Assert.IsTrue(selectedCountries.Count > 0);
        //}


        //[TestMethod()]
        //[ExpectedException(typeof(ArgumentNullException))]
        //public void AddCountry_NullCountryThrowNewArgumentNullExceptionTest()
        //{
        //    //Arrange

        //    Country country = null;
        //    ICountryService countryServie = ServiceFactory.Current.Resolve<ICountryService>();

        //    //Act
        //    countryServie.AddCountry(country);
        //}


        //[TestMethod()]
        //public void RemoveCountry_Invoke_Test()
        //{
        //    //Arrange
        //    ICountryService countryService = ServiceFactory.Current.Resolve<ICountryService>();
        //    string countryName = "France";
        //    Country country = new Country()
        //    {
        //        CountryId = new Guid(),
        //        CountryName = countryName
        //    };

        //    //Act
        //    countryService.RemoveCountry(country);
        //}


        //[TestMethod()]
        //[ExpectedException(typeof(ArgumentNullException))]
        //public void RemoveCountry_NullCountryThrowNewArgumentNullExceptionTest()
        //{
        //    //Arrange

        //    Country country = null;
        //    ICountryService countryServie = ServiceFactory.Current.Resolve<ICountryService>();

        //    //Act
        //    countryServie.RemoveCountry(country);
        //}


        //[TestMethod()]
        //public void ChangeCountry_Invoke_Test()
        //{
        //    //Arrange
        //    ICountryService countryService = ServiceFactory.Current.Resolve<ICountryService>();
        //    string countryName = "Spain";
        //    Country country = new Country()
        //    {
        //        CountryId = new Guid(),
        //        CountryName = countryName
        //    };

        //    //Act
        //    countryService.ChangeCountry(country);

        //    //Assert
        //    List<Country> selectedCountries = countryService.FindCountriesByName(countryName);

        //    Assert.IsNotNull(selectedCountries);
        //    Assert.IsTrue(selectedCountries.Count == 1);
        //}


        //[TestMethod()]
        //[ExpectedException(typeof(ArgumentNullException))]
        //public void ModifyCountry_NullCountryThrowNewArgumentNullExceptionTest()
        //{
        //    //Arrange

        //    Country country = null;
        //    ICountryService countryService = ServiceFactory.Current.Resolve<ICountryService>();

        //    //Act
        //    countryService.ChangeCountry(country);
        //}


        #endregion Public Test Methods


    }

}
